package com.fy.fyspace.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * AI扩图请求DTO
 */
@Data
@ApiModel(description = "AI扩图请求参数")
public class UpscaleDTO {
  /**
   * 图片文件
   */
  @NotNull(message = "图片文件不能为空")
  @ApiModelProperty(value = "图片文件", required = true)
  private MultipartFile file;

  /**
   * 放大倍数
   */
  @Min(value = 2, message = "放大倍数最小为2")
  @Max(value = 4, message = "放大倍数最大为4")
  @ApiModelProperty(value = "放大倍数，支持2或4", example = "2")
  private Integer scale = 2;
}